# Maintainer: Ronald van Haren <ronald.archlinux.org>
# Contributor: Travis Willard <travisw@wmpub.ca>
# Contributor: Georg Grabler <ggrabler@gmail.com>

pkgname=ktorrent
pkgver=23.04.1
pkgrel=1
pkgdesc='A powerful BitTorrent client for KDE'
arch=(x86_64)
url='https://apps.kde.org/ktorrent/'
license=(GPL2)
depends=(libktorrent kcmutils knotifyconfig kparts phonon-qt5 qt5-webengine)
makedepends=(extra-cmake-modules kdoctools boost plasma-workspace kdnssd taglib syndication kplotting geoip)
optdepends=('plasma-workspace: shutdown plugin' 'kdnssd: zeroconf plugin' 'taglib: mediaplayer plugin' 'geoip: info widget plugin'
            'syndication: syndication plugin' 'kplotting: statistics plugin')
groups=(kde-applications kde-network)
source=(https://download.kde.org/stable/release-service/$pkgver/src/$pkgname-$pkgver.tar.xz{,.sig})
sha256sums=('848fb319796aebf8553b04f9475c5058d7d4e817ccf5e87a3bbe5780403625d8'
            'SKIP')
validpgpkeys=(CA262C6C83DE4D2FB28A332A3A6A4DB839EAA6D7  # Albert Astals Cid <aacid@kde.org>
              F23275E4BF10AFC1DF6914A6DBD2CE893E2D1C87  # Christoph Feck <cfeck@kde.org>
              D81C0CB38EB725EF6691C385BB463350D6EF31EF) # Heiko Becker <heiko.becker@kde.org>

build() {
  cmake -B build -S $pkgname-$pkgver
  cmake --build build
}

package() {
  DESTDIR="$pkgdir" cmake --install build
}
